﻿<s:SurfaceWindow x:Class="Samples.SurfaceExpander.SurfaceWindowMain"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:s="http://schemas.microsoft.com/surface/2008"
                 xmlns:tk="clr-namespace:Black.SurfaceToolkit.Controls;assembly=Black.SurfaceToolkit"
                 Title="Samples.SurfaceExpander">
    <s:SurfaceWindow.Resources>
        <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg" />

    </s:SurfaceWindow.Resources>

    <Grid Background="{StaticResource WindowBackground}" 
          Width="1024" Height="768">
        
        <!-- Expander en état fermer-->

        <tk:SurfaceExpander Header="Surface Expander"
                            HeaderBackground="White"
                            Width="200" BorderThickness="1" BorderBrush="DarkGray"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            Margin="200,0,0,0">
            <Border Background="LightGray">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Column="0" Grid.Row="0" Foreground="Black" FontWeight="Bold">
                        Nom
                    </TextBlock>
                    <s:SurfaceTextBox Grid.Column="1" Grid.Row="0">
                        Dupont
                    </s:SurfaceTextBox>

                    <TextBlock Grid.Column="0" Grid.Row="1" Foreground="Black" FontWeight="Bold">
                        Prénom
                    </TextBlock>
                    <s:SurfaceTextBox Grid.Column="1" Grid.Row="1">
                        Robert
                    </s:SurfaceTextBox>

                    <TextBlock Grid.Column="0" Grid.Row="2" Foreground="Black" FontWeight="Bold">
                        Age
                    </TextBlock>
                    <s:SurfaceTextBox Grid.Column="1" Grid.Row="2">
                        22
                    </s:SurfaceTextBox>

                </Grid>
            </Border>
        </tk:SurfaceExpander>

        <!-- Expander en état ouvert-->

        <tk:SurfaceExpander Header="Surface Expander"
                            HeaderBackground="White"
                            IsExpanded="True"
                            Width="200" BorderThickness="1" BorderBrush="DarkGray"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Margin="0,0,200,0">
            <Border Background="LightGray">
                <Grid Background="LightGray" Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Column="0" Grid.Row="0"  Foreground="Black" FontWeight="Bold">
                    Nom
                    </TextBlock>
                    <s:SurfaceTextBox Grid.Column="1" Grid.Row="0">
                        Durant
                    </s:SurfaceTextBox>

                    <TextBlock Grid.Column="0" Grid.Row="1" Foreground="Black" FontWeight="Bold">
                    Prénom
                    </TextBlock>
                    <s:SurfaceTextBox Grid.Column="1" Grid.Row="1">
                        Alphonse
                    </s:SurfaceTextBox>

                    <TextBlock Grid.Column="0" Grid.Row="2" Foreground="Black" FontWeight="Bold">
                    Age
                    </TextBlock>
                    <s:SurfaceTextBox Grid.Column="1" Grid.Row="2">
                        31
                    </s:SurfaceTextBox>

                </Grid>
            </Border>
        </tk:SurfaceExpander>
        
    </Grid>
</s:SurfaceWindow>
